﻿<UserControl x:Class="OpenTKLightingTool.Controls.MaterialList"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
             xmlns:ctrl="clr-namespace:OpenTKLightingTool.Controls"                        
             mc:Ignorable="d" 
             d:DesignHeight="300" d:DesignWidth="360">
    <Grid>
        <Grid.RowDefinitions>
            <RowDefinition Height="*" />
            <RowDefinition Height="Auto" />
        </Grid.RowDefinitions>

        <DataGrid x:Name="uxMaterials" Grid.Row="0" AutoGenerateColumns="False" CanUserAddRows="False" CanUserDeleteRows="False" CanUserReorderColumns="False" CanUserResizeColumns="False"
                            CanUserResizeRows="False" CanUserSortColumns="False" SelectionMode="Single">
            <DataGrid.Columns>                          
                <DataGridTextColumn Width="*" Header="Material Name" IsReadOnly="True" Binding="{Binding}" />
            </DataGrid.Columns>
            <DataGrid.Resources>
                <Style TargetType="{x:Type DataGridCell}" BasedOn="{StaticResource {x:Type DataGridCell}}" >
                    <Setter Property="Background" Value="White" />
                    <Style.Triggers>
                        <Trigger Property="IsSelected" Value="True">
                            <Setter Property="BorderBrush" Value="Black" />
                            <Setter Property="Background" Value="OrangeRed"  />
                            <Setter Property="Foreground" Value="Yellow"  />
                            <Setter Property="FontWeight" Value="Bold" />
                        </Trigger>
                    </Style.Triggers>
                </Style>
            </DataGrid.Resources>
        </DataGrid>

        <GroupBox Header="Properties" Grid.Row="1" Margin="5">
            <ctrl:MaterialProperties x:Name="uxProperties"  />
        </GroupBox>

    </Grid>
</UserControl>
